package io.huaguoguo.learn.controller;

import io.huaguoguo.learn.entity.User;
import io.huaguoguo.learn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述：  <br>
 * CreateDate: 2021/11/14 <br>
 *
 * @author huaguoguo
 */
@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    private UserService userService;



    @PostMapping
    public String updateUser(@RequestBody User user){
        userService.updateUser(user);
        return "修改成功";
    }
}
